﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
/// <summary>
/// Summary description for BaseDBConnect
/// </summary>
public class BaseDBConnect
{
    public string connString = ConfigurationManager.ConnectionStrings["connString"].ConnectionString;
	public BaseDBConnect()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public SqlConnection getCon() {
        SqlConnection con = new SqlConnection(connString);
        con.Open();
        return con;
    }
        
    public void closeCon(SqlConnection con){
     if (con.State != ConnectionState.Closed)
            {
                con.Close();
            }
    }
}